

cc.Class({
    extends: cc.Component,

    properties: {
        label_hit: cc.Label
    },

    setInfo(txt,isbaoji){
        var a = parseInt(txt);
        
        if(isbaoji==true){
            this.node.getComponent(cc.Label).string = "暴击 -"+a;
        }else{
            this.node.getComponent(cc.Label).string = "-"+a;
        }
        this.node.getComponent(cc.Label).string = "-"+a;
        var self = this;
        var moveTo = cc.moveTo(0.5, cc.v2(this.node.x, this.node.y + 50))
        this.node.runAction(cc.sequence(moveTo, cc.callFunc(function () {            
            self.node.destroy();
        })))
    }
});
